import glob


if __name__ == '__main__':
    import sys
    in_dir = sys.argv[1]
    dirs = glob.glob(in_dir + '/*.txt')
    # print(dirs)
    for f in dirs:
        category = f.split('/')[-1].split('.')[0]
        for l in open(f):
            print(category + '\t' + l.strip())
